var Pay = {
	Detail: {
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Pay/' + language + '.js');
			Utils.initAjax();
			
			Pay.Detail.View.init();
		},
		
		View: {
			dataGridPanelContainer: '',
			
			init: function() {
				Pay.Detail.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Pay.Detail.View.DataGrid.init();
			},
			
			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				accountValidateboxLabelContainer: '',
				accountValidateboxInputContainer: '',
				roleNameValidateboxLabelContainer: '',
				roleNameValidateboxInputContainer: '',
				startDatetimeboxLabelContainer: '',
				startDatetimeboxInputContainer: '',
				endDatetimeboxLabelContainer: '',
				endDatetimeboxInputContainer: '',
				searchButtonContainer: '',

				init: function() {
					Pay.Detail.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Pay.Detail.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Pay.Detail.View.DataGrid.accountValidateboxLabelContainer = $('#dataGridPanel #toolbar #accountValidateboxLabel');
					Pay.Detail.View.DataGrid.accountValidateboxInputContainer = $('#dataGridPanel #toolbar #accountValidateboxInput');
					Pay.Detail.View.DataGrid.roleNameValidateboxLabelContainer = $('#dataGridPanel #toolbar #roleNameValidateboxLabel');
					Pay.Detail.View.DataGrid.roleNameValidateboxInputContainer = $('#dataGridPanel #toolbar #roleNameValidateboxInput');
					Pay.Detail.View.DataGrid.startDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #startDatetimeboxLabel');
					Pay.Detail.View.DataGrid.startDatetimeboxInputContainer = $('#dataGridPanel #toolbar #startDatetimeboxInput');
					Pay.Detail.View.DataGrid.endDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #endDatetimeboxLabel');
					Pay.Detail.View.DataGrid.endDatetimeboxInputContainer = $('#dataGridPanel #toolbar #endDatetimeboxInput');
					Pay.Detail.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Pay.Detail.View.DataGrid.create();
				},
				
				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Pay.Detail.View.dataGridPanelContainer.width(width);
					Pay.Detail.View.dataGridPanelContainer.height(height);
					Pay.Detail.View.dataGridPanelContainer.datagrid({
						fitColumns: false,
						toolbar: '#toolbar',
						columns: [[
							{
								field: 'orderId',
								title: payDetailViewDataGridColumnTitle1,
								width: 300
							},
							{
								field: 'userId',
								title: payDetailViewDataGridColumnTitle5,
								width: 100
							},
							{
								field: 'roleName',
								title: payDetailViewDataGridColumnTitle6,
								width: 100
							},
							{
								field: 'money',
								title: payDetailViewDataGridColumnTitle2,
								width: 100,
								formatter: function(value) {
									var money = value / 100;
									return money.toFixed(2);
								}
							},
							{
								field: 'gold',
								title: payDetailViewDataGridColumnTitle3,
								width: 100,
							},
							{
								field: 'payDateTime',
								title: payDetailViewDataGridColumnTitle4,
								width: 150,
							},
						]],
						loadFilter: Utils.dataGridLoadFilter,
						pagination: true,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
					Component.Combogrid.GameArea.create(
						Pay.Detail.View.DataGrid.gameAreaCombogridLabelContainer,
						Pay.Detail.View.DataGrid.gameAreaCombogridInputContainer
					);
					Component.Validatebox.Account.create(
						Pay.Detail.View.DataGrid.accountValidateboxLabelContainer,
						Pay.Detail.View.DataGrid.accountValidateboxInputContainer
					);
					Component.Validatebox.RoleName.create(
						Pay.Detail.View.DataGrid.roleNameValidateboxLabelContainer,
						Pay.Detail.View.DataGrid.roleNameValidateboxInputContainer
					);
					Component.Datetimebox.Start.create(
						Pay.Detail.View.DataGrid.startDatetimeboxLabelContainer,
						Pay.Detail.View.DataGrid.startDatetimeboxInputContainer
					);
					Component.Datetimebox.End.create(
						Pay.Detail.View.DataGrid.endDatetimeboxLabelContainer,
						Pay.Detail.View.DataGrid.endDatetimeboxInputContainer
					);
					Pay.Detail.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: payDetailViewDataGridToolbarButtonText1,
					});
					Pay.Detail.View.DataGrid.searchButtonContainer.bind(
						'click',
						Pay.Detail.View.DataGrid.doSearch
					);
				},
				
				doSearch: function() {
					Pay.Detail.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Pay/detail/getListData',
						queryParams: {
							gameAreaId: Pay.Detail.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
							account: Pay.Detail.View.DataGrid.accountValidateboxInputContainer[0].value,
							roleName: Pay.Detail.View.DataGrid.roleNameValidateboxInputContainer[0].value,
							startDateTime: Pay.Detail.View.DataGrid.startDatetimeboxInputContainer.datetimebox('getValue'),
							endDateTime: Pay.Detail.View.DataGrid.endDatetimeboxInputContainer.datetimebox('getValue'),
						}
					});
				},
			},
		},
	},
	
	Summary: {
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Pay/' + language + '.js');
			Utils.initAjax();
			
			Pay.Summary.View.init();
		},
		
		View: {
			dataGridPanelContainer: '',
			
			init: function() {
				Pay.Summary.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Pay.Summary.View.DataGrid.init();
			},
			
			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				startDateboxLabelContainer: '',
				startDateboxInputContainer: '',
				endDateboxLabelContainer: '',
				endDateboxInputContainer: '',
				paySummaryTypeLabelContainer: '',
				paySummaryTypeInputContainer: '',
				searchButtonContainer: '',

				init: function() {
					Pay.Summary.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Pay.Summary.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Pay.Summary.View.DataGrid.startDateboxLabelContainer = $('#dataGridPanel #toolbar #startDateboxLabel');
					Pay.Summary.View.DataGrid.startDateboxInputContainer = $('#dataGridPanel #toolbar #startDateboxInput');
					Pay.Summary.View.DataGrid.endDateboxLabelContainer = $('#dataGridPanel #toolbar #endDateboxLabel');
					Pay.Summary.View.DataGrid.endDateboxInputContainer = $('#dataGridPanel #toolbar #endDateboxInput');
					Pay.Summary.View.DataGrid.paySummaryTypeLabelContainer = $('#dataGridPanel #toolbar #paySummaryTypeLabel');
					Pay.Summary.View.DataGrid.paySummaryTypeInputContainer = $('#dataGridPanel #toolbar #paySummaryTypeInput');
					Pay.Summary.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Pay.Summary.View.DataGrid.create();
				},
				
				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Pay.Summary.View.dataGridPanelContainer.width(width);
					Pay.Summary.View.dataGridPanelContainer.height(height);
					Pay.Summary.View.dataGridPanelContainer.datagrid({
						fitColumns: false,
						toolbar: '#toolbar',
						columns: [[
							{
								field: 'date',
								title: paySummaryViewDataGridColumnTitle1,
								width: 150,
							},
							{
								field: 'operatorName',
								title: paySummaryViewDataGridColumnTitle2,
								width: 80,
								hidden: true,
							},
//							{
//								field: 'areaNum',
//								title: paySummaryViewDataGridColumnTitle3,
//								width: 60,
//							},
							{
								field: 'money',
								title: paySummaryViewDataGridColumnTitle4,
								width: 80,
								formatter: function(value) {
									return value / 100;
								}
							},
						]],
						loadFilter: Utils.dataGridLoadFilter,
						onLoadSuccess: function() {
							var summaryTypeId = Pay.Summary.View.DataGrid.paySummaryTypeInputContainer.combobox('getValue');
							
							switch(summaryTypeId) {
								case '1':
									Pay.Summary.View.dataGridPanelContainer.datagrid('hideColumn', 'operatorName');
									Pay.Summary.View.dataGridPanelContainer.datagrid('showColumn', 'date');
									Pay.Summary.View.Chart.Line.create();
									break;
									
								case '2':
									Pay.Summary.View.dataGridPanelContainer.datagrid('showColumn', 'operatorName');
									Pay.Summary.View.dataGridPanelContainer.datagrid('hideColumn', 'date');
									Pay.Summary.View.Chart.Pie.create();
									break;
							}
						}
					});
					Component.Combogrid.GameArea.create(
						Pay.Summary.View.DataGrid.gameAreaCombogridLabelContainer,
						Pay.Summary.View.DataGrid.gameAreaCombogridInputContainer,
						true
					);
					Component.Datebox.Start.create(
						Pay.Summary.View.DataGrid.startDateboxLabelContainer,
						Pay.Summary.View.DataGrid.startDateboxInputContainer
					);
					Component.Datebox.End.create(
						Pay.Summary.View.DataGrid.endDateboxLabelContainer,
						Pay.Summary.View.DataGrid.endDateboxInputContainer
					);
					Component.Combobox.PaySummaryType.create(
						Pay.Summary.View.DataGrid.paySummaryTypeLabelContainer,
						Pay.Summary.View.DataGrid.paySummaryTypeInputContainer
					);
					Pay.Summary.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: paySummaryViewDataGridToolbarButtonText1,
					});
					Pay.Summary.View.DataGrid.searchButtonContainer.bind(
						'click',
						Pay.Summary.View.DataGrid.doSearch
					);
				},
				
				doSearch: function() {
					Pay.Summary.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Pay/summary/getListData',
						queryParams: {
							gameAreaIdString: Pay.Summary.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValues').toString(),
							startDate: Pay.Summary.View.DataGrid.startDateboxInputContainer.datetimebox('getValue'),
							endDate: Pay.Summary.View.DataGrid.endDateboxInputContainer.datetimebox('getValue'),
							paySummaryTypeId: Pay.Summary.View.DataGrid.paySummaryTypeInputContainer.combobox('getValue'),
						},
					})
				},
			},
			
			Chart: {
				Line: {
					create: function() {
						var data = Pay.Summary.View.dataGridPanelContainer.datagrid('getData');
						var chartData = [];
						
						for(index = 0; index < data.rows.length; index++) {
							tmp = [];
							tmp.push(data.rows[index].date);
							tmp.push(Number(data.rows[index].money) / 100);
							chartData.push(tmp);
						}
						
						var data = [chartData];
						var options = {
							axes: {
								xaxis: {
									numberTicks: chartData.length,
									renderer: $.jqplot.DateAxisRenderer,
								},
								yaxis: {
									min: 0
								}
							},
							highlighter: {
								show: true,
								lineWidthAdjust: 2.5,
								sizeAdjust: 5,
								showTooltip: true,
								tooltipLocation: 'nw',
								useAxesFormatters: false,
								tooltipAxes: 'y'
							}
						}
						
						var chart = $.jqplot('chart', data, options);
						chart.redraw();
					}
				},
				
				Pie: {
					create: function() {
						var data = Pay.Summary.View.dataGridPanelContainer.datagrid('getData');
						var chartData = [];
						
						for(index = 0; index < data.rows.length; index++) {
							tmp = [];
							tmp.push(data.rows[index].operatorName);
							tmp.push(Number(data.rows[index].money) / 100);
							chartData.push(tmp);
						}
						
						var data = [chartData];
						var options = {
							seriesDefaults: {
								renderer: jQuery.jqplot.PieRenderer,
								rendererOptions: {
									showDataLabels: true,
								},
								
							},
							legend: {
								show:true,
								location: 'e'
							}
						}
						
						var chart = $.jqplot('chart', data, options);
						chart.redraw();
					}
				}
			},
		},
	},
	
	Apply: {
		applyWindowContainer: '',
		
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Pay/' + language + '.js');
			Utils.initAjax();
			
			Pay.Apply.ApplyWindow.init();
			Pay.Apply.View.init();
		},
		
		View: {
			dataGridPanelContainer: '',
			
			init: function() {
				Pay.Apply.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Pay.Apply.View.DataGrid.init();
			},
				
			DataGrid: {
				init: function() {
					Pay.Apply.View.DataGrid.create();	
				},
					
				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Pay.Apply.View.dataGridPanelContainer.width(width);
					Pay.Apply.View.dataGridPanelContainer.height(height);
					Pay.Apply.View.dataGridPanelContainer.datagrid({
						idField: "applyId",
						singleSelect: true,
						fitColumns: false,
						url: '/index.php/Pay/apply/getListData',
						toolbar: [
							{
								iconCls: 'icon-add',
								text: payApplyViewDataGridToolbarButtonText1,
								handler: Pay.Apply.ApplyWindow.open,
							},
							{
								iconCls: 'icon-edit',
								text: payApplyViewDataGridToolbarButtonText2,
								handler: Pay.Apply.View.doApproval,
							},
						],
						columns: [[
							{
								checkbox: true,
							},
							{
								field: 'applyId',
								title: payApplyViewDataGridColumnTitle1,
								width: 60,
							},
							{
								field: 'operatorName',
								title: payApplyViewDataGridColumnTitle2,
								width: 80,
							},
							{
								field: 'areaNum',
								title: payApplyViewDataGridColumnTitle3,
								width: 60,
							},
							{
								field: 'account',
								title: payApplyViewDataGridColumnTitle4,
								width: 100,
							},
							{
								field: 'roleName',
								title: payApplyViewDataGridColumnTitle5,
								width: 100,
							},
							{
								field: 'money',
								title: payApplyViewDataGridColumnTitle6,
								width: 80,
								formatter: function(value) {
									var money = value / 100;
									return money.toFixed(2);
								},
							},
							{
								field: 'applyUserName',
								title: payApplyViewDataGridColumnTitle7,
								width: 100,
							},
							{
								field: 'applyDatetime',
								title: payApplyViewDataGridColumnTitle8,
								width: 150,
							},
							{
								field: 'reason',
								title: payApplyViewDataGridColumnTitle9,
								width: 100,
							},
							{
								field: 'approvalUserName',
								title: payApplyViewDataGridColumnTitle10,
								width: 100,
							},
							{
								field: 'approvalDatetime',
								title: payApplyViewDataGridColumnTitle11,
								width: 150,
							},
							{
								field: 'status',
								title: payApplyViewDataGridColumnTitle12,
								width: 80,
								formatter: function(value) {
									switch(value) {
										case '1' :
											return payApplyStatus1;
											break;
											
										case '2' :
											return payApplyStatus2;
											break;
											
										case '3' :
											return payApplyStatus3;
											break;
											
										case '4' :
											return payApplyStatus4;
											break;
											
										case '5' :
											return payApplyStatus5;
											break;
											
										case '6' :
											return payApplyStatus6;
											break;
											
										default:
											return value;
									}
								},
							},
						]],
						loadFilter: Utils.dataGridLoadFilter,
						pagination: true,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
				},
				
				load: function() {
					Pay.Apply.View.dataGridPanelContainer.datagrid('reload');
				},
				
				getCheckedRows: function(allowMulti) {
					var allowMulti = arguments[0] ? arguments[0] : false;
					var checkedRow = Pay.Apply.View.dataGridPanelContainer.datagrid('getChecked');
					
					if(Utils.dataGridValidateCheckedRow(checkedRow, allowMulti) === true) {
						return checkedRow;
					}
					else {
						return false;
					}
				},
			},
			
			doApproval: function() {
				var checkedRow = Pay.Apply.View.DataGrid.getCheckedRows();
				
				if(checkedRow != false) {
					$.messager.defaults = {ok: payApplyApprovalConfirmWindowOkMessage, cancel: payApplyApprovalConfirmWindowCancelMessage};
					$.messager.confirm(
						'Confirm',
						payApplyApprovalConfirmWindowMessage,
						function(r) {
							$.messager.defaults = {ok: 'Ok', cancel: 'Cancel'};
							
							if(r) {
								status = 2;
							}
							else {
								status = 3;
							}
							
							$.ajax({
								url: '/index.php/Pay/apply/approval',
								data: {
									applyId: checkedRow[0].applyId,
									status: status,
								}
							})
							.done(function(response) {
								if(response.errorCode === 0) {
									$.messager.alert(messageWindowTitle, payApplyApprovalSuccessInfo, 'info');
									Pay.Apply.View.DataGrid.load();
								}
							});
						}
					);
				}
			},
		},
		
		ApplyWindow: {
			gameAreaLabelContainer: '',
			gameAreaInputContainer: '',
			accountLabelContainer: '',
			accountInputContainer: '',
			roleNameLabelContainer: '',
			roleNameInputContainer: '',
			moneyLabelContainer: '',
			moneyInputContainer: '',
			reasonLabelContainer: '',
			reasonInputContainer: '',
			submitButtonContainer: '',
			resetButtonContainer: '',
			
			init: function() {
				Pay.Apply.applyWindowContainer = $('#applyWindow');
				
				Pay.Apply.ApplyWindow.gameAreaLabelContainer = $('#applyWindow #gameAreaLabel');
				Pay.Apply.ApplyWindow.gameAreaInputContainer = $('#applyWindow #gameAreaInput');
				Pay.Apply.ApplyWindow.accountLabelContainer = $('#applyWindow #accountLabel');
				Pay.Apply.ApplyWindow.accountInputContainer = $('#applyWindow #accountInput');
				Pay.Apply.ApplyWindow.roleNameLabelContainer = $('#applyWindow #roleNameLabel');
				Pay.Apply.ApplyWindow.roleNameInputContainer = $('#applyWindow #roleNameInput');
				Pay.Apply.ApplyWindow.moneyLabelContainer = $('#applyWindow #moneyLabel');
				Pay.Apply.ApplyWindow.moneyInputContainer = $('#applyWindow #moneyInput');
				Pay.Apply.ApplyWindow.reasonLabelContainer = $('#applyWindow #reasonLabel');
				Pay.Apply.ApplyWindow.reasonInputContainer = $('#applyWindow #reasonInput');
				Pay.Apply.ApplyWindow.submitButtonContainer = $('#applyWindow #submitButton');
				Pay.Apply.ApplyWindow.resetButtonContainer = $('#applyWindow #resetButton');
				
				Pay.Apply.ApplyWindow.create();
			},
			
			create: function() {
				Pay.Apply.applyWindowContainer.window({
					title: payApplyApplyWindowTitle,
					collapsible: false,
					minimizable: false,
					maximizable: false,
					closable: true,
					closed: true,
					modal: true,
				});
				Component.Combogrid.GameArea.create(
					Pay.Apply.ApplyWindow.gameAreaLabelContainer,
					Pay.Apply.ApplyWindow.gameAreaInputContainer
				);
				Component.Validatebox.Account.create(
					Pay.Apply.ApplyWindow.accountLabelContainer,
					Pay.Apply.ApplyWindow.accountInputContainer
				);
				Component.Validatebox.RoleName.create(
					Pay.Apply.ApplyWindow.roleNameLabelContainer,
					Pay.Apply.ApplyWindow.roleNameInputContainer
				);
				Component.Numberbox.Money.create(
					Pay.Apply.ApplyWindow.moneyLabelContainer,
					Pay.Apply.ApplyWindow.moneyInputContainer
				);
				Component.Validatebox.Reason.create(
					Pay.Apply.ApplyWindow.reasonLabelContainer,
					Pay.Apply.ApplyWindow.reasonInputContainer
				);
				
				Pay.Apply.ApplyWindow.submitButtonContainer.linkbutton({
					iconCls: 'icon-ok',
					text: payApplyApplyWindowSubmitButtonText,
				});
				Pay.Apply.ApplyWindow.submitButtonContainer.bind(
					'click',
					Pay.Apply.ApplyWindow.doSubmit
				);
				Pay.Apply.ApplyWindow.resetButtonContainer.linkbutton({
					iconCls: 'icon-undo',
					text: payApplyApplyWindowResetButtonText,
				});
				Pay.Apply.ApplyWindow.resetButtonContainer.bind(
					'click',
					Pay.Apply.ApplyWindow.doReset
				);
			},
			
			open: function() {
				Pay.Apply.ApplyWindow.doReset();
				Pay.Apply.applyWindowContainer.window('open');
			},
			
			close: function() {
				Pay.Apply.applyWindowContainer.window('close');
			},
			
			doSubmit: function() {
				$.ajax({
					url: '/index.php/Pay/apply/add',
					data: {
						gameAreaId: Pay.Apply.ApplyWindow.gameAreaInputContainer.combogrid('getValue'),
						account: Pay.Apply.ApplyWindow.accountInputContainer[0].value,
						roleName: Pay.Apply.ApplyWindow.roleNameInputContainer[0].value,
						money: Pay.Apply.ApplyWindow.moneyInputContainer[0].value,
						reason: Pay.Apply.ApplyWindow.reasonInputContainer[0].value
					}
				})
				.done(function(response) {
					if(response.errorCode === 0) {
						$.messager.alert(messageWindowTitle, payApplyApplyWindowSubmitSuccessInfo, 'info');
						Pay.Apply.ApplyWindow.close();
						Pay.Apply.View.DataGrid.load();
					}
				});
			},
			
			doReset: function() {
				Pay.Apply.ApplyWindow.gameAreaInputContainer.combogrid('clear');
				Pay.Apply.ApplyWindow.accountInputContainer[0].value = '';
				Pay.Apply.ApplyWindow.roleNameInputContainer[0].value = '';
				Pay.Apply.ApplyWindow.moneyInputContainer[0].value = '';
				Pay.Apply.ApplyWindow.reasonInputContainer[0].value = '';
			},
		},
	},

	Lists: {
		init: function() {
			Language.getCurrLanguage();
			Utils.loadJavascriptFile('/application/views/libraries/component/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/libraries/utils/' + language + '.js');
			Utils.loadJavascriptFile('/application/views/module/Pay/' + language + '.js');
			Utils.initAjax();

			Pay.Lists.View.init();
		},

		View: {
			dataGridPanelContainer: '',

			init: function() {
				Pay.Lists.View.dataGridPanelContainer = $('#dataGridPanel #dataGrid');
				Pay.Lists.View.DataGrid.init();
			},

			DataGrid: {
				gameAreaCombogridLabelContainer: '',
				gameAreaCombogridInputContainer: '',
				startDatetimeboxInputContainer: '',
				endDatetimeboxLabelContainer: '',
				endDatetimeboxInputContainer: '',
				searchButtonContainer: '',

				init: function() {
					Pay.Lists.View.DataGrid.gameAreaCombogridLabelContainer = $('#dataGridPanel #toolbar #gameAreaCombogridLabel');
					Pay.Lists.View.DataGrid.gameAreaCombogridInputContainer = $('#dataGridPanel #toolbar #gameAreaCombogridInput');
					Pay.Lists.View.DataGrid.startDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #startDatetimeboxLabel');
					Pay.Lists.View.DataGrid.startDatetimeboxInputContainer = $('#dataGridPanel #toolbar #startDatetimeboxInput');
					Pay.Lists.View.DataGrid.endDatetimeboxLabelContainer = $('#dataGridPanel #toolbar #endDatetimeboxLabel');
					Pay.Lists.View.DataGrid.endDatetimeboxInputContainer = $('#dataGridPanel #toolbar #endDatetimeboxInput');
					Pay.Lists.View.DataGrid.searchButtonContainer = $('#dataGridPanel #toolbar #searchButton');
					Pay.Lists.View.DataGrid.create();
				},

				create: function() {
					var width = $(document).width() - 40;
					var height = $(document).height() - 40;
					Pay.Lists.View.dataGridPanelContainer.width(width);
					Pay.Lists.View.dataGridPanelContainer.height(height);
					Pay.Lists.View.dataGridPanelContainer.datagrid({
						rownumbers : true,
						fitColumns: false,
						toolbar: '#toolbar',
						columns: [[

							{
								field: 'roleName',
								title: payListsViewDataGridColumnTitle1,
								width: 200
							},
							{
								field: 'money',
								title: payListsViewDataGridColumnTitle2,
								width: 100,
								formatter: function(value) {
									var money = value / 100;
									return money.toFixed(2);
								}
							},

						]],
						loadFilter: Utils.dataGridLoadFilter,
						pagination: false,
						pageSize: 50,
						pageList: [50, 100, 150, 200],
					});
					Component.Combogrid.GameArea.create(
						Pay.Lists.View.DataGrid.gameAreaCombogridLabelContainer,
						Pay.Lists.View.DataGrid.gameAreaCombogridInputContainer
					);

					Component.Datetimebox.Start.create(
						Pay.Lists.View.DataGrid.startDatetimeboxLabelContainer,
						Pay.Lists.View.DataGrid.startDatetimeboxInputContainer
					);
					Component.Datetimebox.End.create(
						Pay.Lists.View.DataGrid.endDatetimeboxLabelContainer,
						Pay.Lists.View.DataGrid.endDatetimeboxInputContainer
					);
					Pay.Lists.View.DataGrid.searchButtonContainer.linkbutton({
						iconCls: 'icon-search',
						text: payDetailViewDataGridToolbarButtonText1,
					});
					Pay.Lists.View.DataGrid.searchButtonContainer.bind(
						'click',
						Pay.Lists.View.DataGrid.doSearch
					);
				},

				doSearch: function() {
					Pay.Lists.View.dataGridPanelContainer.datagrid({
						url: '/index.php/Pay/lists/getListData',
						queryParams: {
							gameAreaId: Pay.Lists.View.DataGrid.gameAreaCombogridInputContainer.combogrid('getValue'),
							startDateTime: Pay.Lists.View.DataGrid.startDatetimeboxInputContainer.datetimebox('getValue'),
							endDateTime: Pay.Lists.View.DataGrid.endDatetimeboxInputContainer.datetimebox('getValue'),
						}
					});
				},
			},
		},
	},
}